<template>
    <div>
        御剑乘风来,除魔天地间!====我是创建私有组件的地方
        <input
            v-s1a="msg2"
            type="text"
            name=""
            id=""
            placeholder="我是私有组件中的表单"
        >
        <p v-s2a="col">我也是私有指令中的p元素</p>
    </div>
</template>
           
<script>
export default {
  data() {
    return {
      msg2: "私有指令中的数据======",
      col: "blue"
    };
  },
  methods: {},
  directives: {
    s1a: {
      inserted(el, bingding) {
        console.log(bingding, 555);
        el.value = bingding.value;
        el.focus();
      }
    },
    s2a: {
      inserted(el, bingding) {
        console.log(bingding, 666);
        el.style.color = "red";
        el.style.background = bingding.value;
      }
    }
  }
};
</script>
<style scoped>
</style>